.main-nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-logo {
  padding: 15px 0;
  text-align: center;
}

.nav-logo span {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'SimSun', 'STSong', serif;
  color: var(--primary-color);
  display: inline-block;
  position: relative;
}

.nav-logo span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
  transform: scaleX(0.7);
  transition: transform 0.3s ease;
}

.nav-logo:hover span::after {
  transform: scaleX(1);
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex-grow: 1;
  justify-content: center;
}

.nav-item {
  padding: 20px 15px;
  margin: 0 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-item.active {
  border-bottom-color: var(--primary-color);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--primary-color);
}

.nav-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.nav-text {
  font-weight: 500;
}

.theme-toggle {
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 15px;
  cursor: pointer;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  width: 40px;
  height: 40px;
}

.toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .toggle-icon {
  transform: rotate(30deg);
}

/* 移动端样式 */
@media (max-width: 768px) {
  .main-nav {
    padding: 0 10px;
    flex-wrap: wrap;
  }
  
  .nav-logo {
    padding: 10px 0;
  }
  
  .nav-logo span {
    font-size: 1.2rem;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
  }
  
  .nav-item {
    padding: 10px;
    margin: 0;
  }
  
  .nav-text {
    display: none;
  }
  
  .nav-icon {
    margin-right: 0;
    font-size: 1.3rem;
  }
  
  .theme-toggle {
    order: 2;
    margin-left: 0;
  }
}

/* 简化版导航栏 */
.main-nav.simplified {
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-back:hover {
  background-color: rgba(141, 77, 59, 0.1);
}

.nav-back .nav-icon {
  font-size: 1.2rem;
}

.nav-back .nav-text {
  display: none;
}

@media (min-width: 768px) {
  .nav-back .nav-text {
    display: inline;
  }
} 